Skip to content

[emval] Simplify dynamic invoker creation. NFC #24619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2025

Conversation

RReverser
Copy link
Collaborator

No description provided.

@RReverser RReverser requested review from brendandahl and sbc100 June 24, 2025 14:40
@RReverser RReverser force-pushed the opt-create-invoker branch 2 times, most recently from 049e9cc to 42d9dac Compare July 8, 2025 17:37
@RReverser
Copy link
Collaborator Author

I fixed CI, this should be ready for review (I'll just need to rebaseline again before merging).

functionBody +=
' return emval_returnValue(toReturnWire, destructorsRef, rv);\n';
captures['toReturnWire'] = toReturnWire;
captures['emval_returnValue'] = emval_returnValue;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be slightly more compact to just list all the captures in the object literal above? i.e. is there any harm in capturing stuff that isn't used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, just tiny memory overhead I guess, but when we implement AOT as shown in #24540, this will also result in larger method caller functions in the static JS.

I'd rather keep it.

@RReverser RReverser enabled auto-merge (squash) July 9, 2025 19:12
@RReverser RReverser force-pushed the opt-create-invoker branch from 42d9dac to fd34acc Compare July 9, 2025 19:12
@brendandahl
Copy link
Collaborator

Looks like AOT mode is broken.

@RReverser
Copy link
Collaborator Author

Looks like AOT mode is broken.

Yeah which is weird, because I already fixed it - it was fine in 049e9cc. I think I force-pushed something wrong from the other laptop. Will fix.

@RReverser RReverser force-pushed the opt-create-invoker branch from fd34acc to 12789d8 Compare July 9, 2025 22:08
@RReverser RReverser merged commit 75a9aec into emscripten-core:main Jul 9, 2025
30 checks passed
@RReverser RReverser deleted the opt-create-invoker branch July 9, 2025 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants